#lang racket


(require "../base/main.rkt")

(require "constructor.rkt"
         "nodes.rkt")

(provide bind-constructors-to-nodes)


(define (bind-constructors-to-nodes)
  ; primitives
  (set-arc! make-arc-node)
  (set-elliptical-arc! make-elliptical-arc-node)
  (set-circle! make-circle-node)
  (set-donut! make-donut-node)
  (set-ellipse! make-ellipse-node)
  (set-helix-2d! make-helix-2d-node)
  (set-line! make-line-node)
  (set-ngon! make-ngon-node)
  (set-nurbs-curve! make-nurbs-curve-node)
  (set-nurbs-surface! make-nurbs-surface-node)
  (set-rectangle! make-rectangle-node)
  (set-spline! make-spline-node)
  (set-star! make-star-node)
  
  ;(set-text! make-text-node)
  
  (set-box! make-box-node)
  (set-cone! make-cone-node)
  (set-cone-frustrum! make-cone-frustrum-node)
  (set-cylinder! make-cylinder-node)
  
  ;(define (elliptical-cone x-radius y-radius height))
  ;(define (gengon width sides fillet-width height))
  ;(define (helix-3d base-radius top-radius section-radius turns turn-height direction))
  ;(define (mesh vertices faces))
  ;(define (paraboloid radius height))
  
  (set-pipe! make-pipe-node)
  
  ;(define (platonic-solids width sides))
  ;(define (pyramid width sides height))
  
  (set-sphere! make-sphere-node)
  
  
  ; operations
  
  ;(define (spindle radius height))
  ;(define (superellipsoid width length height))
  ;(define (torus base-radius section-radius))
  ;(define (truncated-icosahedron width))
  ;(define (wedge width height))
  
  (set-extrude! make-extrude-node)
  
  ;(define (guide-loft guide shapes))
  
  (set-intersect! make-intersect-node)
  
  ;(define (lattice shape))
  
  (set-join! make-join-node)
  (set-loft! make-loft-node)
  
  
  ;(define (mirror plane shape))
  
  (set-move! make-move-node)
  
  (set-offset! make-offset-node)
  
  ;(define (path-loft path shapes))
  ;(define (revolve axis shape))
  
  (set-rotate! make-rotate-node)
  (set-scale! make-scale-node)
  
  ;(define (slice plane shape))
  
  (set-subtract! make-subtract-node)
  (set-sweep! make-sweep-node)

  ;(define (thicken length shape))
  
  (set-union! make-union-node)
  
  
  ; lang
  
  (set-on-left! make-on-left-node)
  (set-on-right! make-on-right-node)
  (set-on-x! make-on-x-node)
  (set-on-front! make-on-front-node)
  (set-on-back! make-on-back-node)
  (set-on-y! make-on-y-node)
  (set-on-top! make-on-top-node)
  (set-on-bottom! make-on-bottom-node)
  (set-on-z! make-on-z-node)
  
  (set-parametrize!
   (λ (shape)
     (evaluate (make-parametrize-node shape))))
  
  (set-evaluate! λid)
  (set-evaluate-toplevel! λid)
  
  
  ; autocad
  
  (set-arc-ppp! make-arc-ppp-node))